//
//  HDUserRegister.swift
//  HuaDaoPeifu
//
//  Created by Erickson on 16/4/7.
//  Copyright © 2016年 paiyipai. All rights reserved.
//

import UIKit

//class PYPUserSystem: NSObject {
//    
//}


struct PYPAuthcode {
    var phone:String!
    var tms:String!
    var reqmode:String!//1: 注册请求; 2: 忘记/找回密码请求;

}

struct PYPCkauthcode {
    var phone:String!
    var code:String!
    var reqmode:String!//1: 注册请求; 2: 忘记/找回密码请求;

}
//修改手机号
struct HDUpdatePhone{
    var atk = String()
    var newphone = String()
    var code = String()
}


/// 注册请求参数
struct PYPReg {
    
    /// 电话
    var phone:String!
    /// 密码 加密：hmacMD5(salt:HD)
    var ptxt:String!
    /// 验证码
    var code:String!
    /// 姓名
    var name:String!
    /// 证件号码
    var critcode:String!
    /// 证件类型
    var crittype:String!
    /// 证件类型
    var crittype_info:String!
    
    /// 注册选择的机构号
    var insurance:String!
    /// 用户类型 1：团队用户 2：专属用户 3：个人用户
    var login_type:String!

    /// 验证码次数：目前没有用 1
    var tms:String! = "1"
    /// hard code:web
    var platfrom:String! = "web"
    /// hard code:1
    var reqmode:String! = "1"
    
    
    func toDict()->[String:String] {
        return ["phone":self.phone,
                "ptxt":self.ptxt,
                "code":self.code,
                "did":AppConstant.did,
                "name":self.name,
                "critcode":self.critcode,
                "crittype":self.crittype,
                "crittype_info":self.crittype_info,
                "insurance":self.insurance,
                "login_type":self.login_type,
                "tms":self.tms,
                "platfrom":self.platfrom,
                "reqmode":self.reqmode,
        
        ]
        
    }
    
    
    /*
     crittype	Y	证件类型证件类型
     0-身份证 1-护照 2-军官证 3-异常身份证 4-户口本 7-出生证 8-其它 9-工号 11-回乡证 8-驾驶证 8-港澳通行证 8-台湾通行证
     
     */
}


struct PYPLogin {
    var phone:String!
    var ptxt:String!
    var did:String!
    var login_type:String!
    func toDict() -> [String:String] {
        return [
            "phone":self.phone,
            "ptxt":self.ptxt,
            "did":AppConstant.did,
            "login_type":self.login_type
        ]
    }
}

struct PYPRepwd {
    var phone:String!
    var newptxt:String!
    var code:String!
}

struct PYPFeedback {
    var atk:String?
    var phone:String!
    var content:String!
}

struct PYPUploadHead {
    var atk:String?
    var headimg:UIImage?
}

class PYPBankInfo: Reflect{
    var bank:String?
    var bankcode:String?
}

class PYPInsuranceInfo: Reflect{
    var Name:String?
    var Code:String?
}






